const BASE_URL = "http://121.89.205.189:3000/api"

const request = (url, method = "GET", data = {}) => {
    return new Promise((resolve, reject) => {
        wx.request({
            url: BASE_URL + url, //仅为示例，并非真实的接口地址
            method,
            data,
            header: {
              'content-type': 'application/json' // 默认值
            },
            success: (res) => {
                resolve(res)
            },
        })
    })
}

module.exports = request;

